using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Runtime.Serialization;
using System.ServiceModel.Web;
using Microsoft.ServiceModel.Web;
using System.ServiceModel.Activation;
using System.Net;
using Microsoft.ServiceModel.Web.SpecializedServices;
using ACME.Northwind.Business;
using System.Configuration;
using Widgetsphere.Core.DataAccess;
using System.Data;
using ACME.Northwind.Business.Objects;
using ACME.Northwind.DataTransfer;
using ACME.Northwind.Business.SelectCommands;
using ACME.Northwind.DALProxy.Extensions;
using System.Text;
using System.Collections;
using System.ServiceModel;
using Widgetsphere.Core.Util;

[assembly: ContractNamespace("", ClrNamespace = "ACME.Northwind.DataService")]
namespace ACME.Northwind.DataService
{
	[ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
	[ServiceContract]
	public partial class Rest
	{
		public Rest() {}

		#region Category Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CategoryList
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "CategoryList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CategoryDTO> CategoryList()
		{
			List<CategoryDTO> retval = new List<CategoryDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CategoryList
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "CategoryList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CategoryDTO> CategoryListJson()
		{
			return this.CategoryList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CategoryList
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "CategoryList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<CategoryDTO> CategoryListXML()
		{
			return this.CategoryList();
		}

		#endregion

		#region Category Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Category?categoryid=somevalue
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "Category({categoryid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CategoryDTO Category(string categoryid)
		{
			CategoryDTO retVal = new CategoryDTO();
			retVal.SelectUsingPK(int.Parse(categoryid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Category?categoryid=somevalue
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "Category({categoryid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CategoryDTO CategoryJson(string categoryid)
		{
			return this.Category(categoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Category?categoryid=somevalue
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "Category({categoryid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		CategoryDTO CategoryXML(string categoryid)
		{
			return this.Category(categoryid);
		}

		#endregion

		#region Category select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CategoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Category objects to the user")]
		[WebGet(UriTemplate = "CategoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CategoryDTO> CategoryListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<CategoryDTO> dtoList = new List<CategoryDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CategoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "CategoryListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CategoryDTO> CategoryListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CategoryListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CategoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebGet(UriTemplate = "CategoryListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<CategoryDTO> CategoryListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CategoryListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Category Select by Column

		#endregion

		#region Category Select By Foreign Key

		#endregion

		#region Category Add Item

		[WebHelp(Comment = "Submits a new or updated Category to be persisted")]
		[WebInvoke(UriTemplate = "Category", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		CategoryDTO PersistCategory(CategoryDTO category)
		{
			return category.Persist();
		}

		#endregion

		#region Category Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Category?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebInvoke(UriTemplate = "Category({categoryid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCategory(string categoryid)
		{
			CategoryDTO category = new CategoryDTO();
			category.SelectUsingPK(int.Parse(categoryid));
			return category.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Category?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebInvoke(UriTemplate = "Category({categoryid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCategoryJson(string categoryid)
		{
			return this.DeleteCategory(categoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Category?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Category objects to the user")]
		[WebInvoke(UriTemplate = "Category({categoryid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCategoryXML(string categoryid)
		{
			return this.DeleteCategory(categoryid);
		}

		#endregion

		#region CustomerCustomerDemo Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoList
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemoList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoList()
		{
			List<CustomerCustomerDemoDTO> retval = new List<CustomerCustomerDemoDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoList
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemoList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoListJson()
		{
			return this.CustomerCustomerDemoList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoList
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemoList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoListXML()
		{
			return this.CustomerCustomerDemoList();
		}

		#endregion

		#region CustomerCustomerDemo Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemo?customerid=somevalue&customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemo({customerid}, {customertypeid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CustomerCustomerDemoDTO CustomerCustomerDemo(string customerid, string customertypeid)
		{
			CustomerCustomerDemoDTO retVal = new CustomerCustomerDemoDTO();
			retVal.SelectUsingPK(customerid, customertypeid);
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemo?customerid=somevalue&customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemo({customerid}, {customertypeid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CustomerCustomerDemoDTO CustomerCustomerDemoJson(string customerid, string customertypeid)
		{
			return this.CustomerCustomerDemo(customerid, customertypeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemo?customerid=somevalue&customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemo({customerid}, {customertypeid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		CustomerCustomerDemoDTO CustomerCustomerDemoXML(string customerid, string customertypeid)
		{
			return this.CustomerCustomerDemo(customerid, customertypeid);
		}

		#endregion

		#region CustomerCustomerDemo select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemoListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CustomerCustomerDemoDTO> CustomerCustomerDemoListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<CustomerCustomerDemoDTO> dtoList = new List<CustomerCustomerDemoDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemoListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CustomerCustomerDemoDTO> CustomerCustomerDemoListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CustomerCustomerDemoListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebGet(UriTemplate = "CustomerCustomerDemoListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<CustomerCustomerDemoDTO> CustomerCustomerDemoListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CustomerCustomerDemoListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region CustomerCustomerDemo Select by Column

		#endregion

		#region CustomerCustomerDemo Select By Foreign Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoByCustomerDemographic?customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects for the parent CustomerDemographic object.")]
		[WebGet(UriTemplate = "CustomerDemographic({customertypeid})/CustomerCustomerDemo", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoByCustomerDemographic(string customertypeid)
		{
			List<CustomerCustomerDemoDTO> retval = new List<CustomerCustomerDemoDTO>();
			retval.SelectByCustomerDemographic(customertypeid);
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoByCustomerDemographic?customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects for the parent CustomerDemographic object.")]
		[WebGet(UriTemplate = "CustomerDemographic({customertypeid})/CustomerCustomerDemo?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoByCustomerDemographicJson(string customertypeid)
		{
			return CustomerCustomerDemoByCustomerDemographic(customertypeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoByCustomerDemographic?customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects for the parent CustomerDemographic object.")]
		[WebGet(UriTemplate = "CustomerDemographic({customertypeid})/CustomerCustomerDemo?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoByCustomerDemographicXML(string customertypeid)
		{
			return CustomerCustomerDemoByCustomerDemographic(customertypeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoByCustomer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects for the parent Customer object.")]
		[WebGet(UriTemplate = "Customer({customerid})/CustomerCustomerDemo", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoByCustomer(string customerid)
		{
			List<CustomerCustomerDemoDTO> retval = new List<CustomerCustomerDemoDTO>();
			retval.SelectByCustomer(customerid);
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoByCustomer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects for the parent Customer object.")]
		[WebGet(UriTemplate = "Customer({customerid})/CustomerCustomerDemo?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoByCustomerJson(string customerid)
		{
			return CustomerCustomerDemoByCustomer(customerid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemoByCustomer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects for the parent Customer object.")]
		[WebGet(UriTemplate = "Customer({customerid})/CustomerCustomerDemo?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<CustomerCustomerDemoDTO> CustomerCustomerDemoByCustomerXML(string customerid)
		{
			return CustomerCustomerDemoByCustomer(customerid);
		}

		#endregion

		#region CustomerCustomerDemo Add Item

		[WebHelp(Comment = "Submits a new or updated CustomerCustomerDemo to be persisted")]
		[WebInvoke(UriTemplate = "CustomerCustomerDemo", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		CustomerCustomerDemoDTO PersistCustomerCustomerDemo(CustomerCustomerDemoDTO customercustomerdemo)
		{
			return customercustomerdemo.Persist();
		}

		#endregion

		#region CustomerCustomerDemo Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemo?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebInvoke(UriTemplate = "CustomerCustomerDemo({customerid}, {customertypeid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerCustomerDemo(string customerid, string customertypeid)
		{
			CustomerCustomerDemoDTO customercustomerdemo = new CustomerCustomerDemoDTO();
			customercustomerdemo.SelectUsingPK(customerid, customertypeid);
			return customercustomerdemo.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemo?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebInvoke(UriTemplate = "CustomerCustomerDemo({customerid}, {customertypeid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerCustomerDemoJson(string customerid, string customertypeid)
		{
			return this.DeleteCustomerCustomerDemo(customerid, customertypeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerCustomerDemo?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerCustomerDemo objects to the user")]
		[WebInvoke(UriTemplate = "CustomerCustomerDemo({customerid}, {customertypeid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerCustomerDemoXML(string customerid, string customertypeid)
		{
			return this.DeleteCustomerCustomerDemo(customerid, customertypeid);
		}

		#endregion

		#region CustomerDemographic Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographicList
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographicList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerDemographicDTO> CustomerDemographicList()
		{
			List<CustomerDemographicDTO> retval = new List<CustomerDemographicDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographicList
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographicList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerDemographicDTO> CustomerDemographicListJson()
		{
			return this.CustomerDemographicList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographicList
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographicList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<CustomerDemographicDTO> CustomerDemographicListXML()
		{
			return this.CustomerDemographicList();
		}

		#endregion

		#region CustomerDemographic Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographic?customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographic({customertypeid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CustomerDemographicDTO CustomerDemographic(string customertypeid)
		{
			CustomerDemographicDTO retVal = new CustomerDemographicDTO();
			retVal.SelectUsingPK(customertypeid);
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographic?customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographic({customertypeid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CustomerDemographicDTO CustomerDemographicJson(string customertypeid)
		{
			return this.CustomerDemographic(customertypeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographic?customertypeid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographic({customertypeid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		CustomerDemographicDTO CustomerDemographicXML(string customertypeid)
		{
			return this.CustomerDemographic(customertypeid);
		}

		#endregion

		#region CustomerDemographic select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographicListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographicListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CustomerDemographicDTO> CustomerDemographicListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<CustomerDemographicDTO> dtoList = new List<CustomerDemographicDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographicListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographicListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CustomerDemographicDTO> CustomerDemographicListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CustomerDemographicListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographicListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebGet(UriTemplate = "CustomerDemographicListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<CustomerDemographicDTO> CustomerDemographicListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CustomerDemographicListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region CustomerDemographic Select by Column

		#endregion

		#region CustomerDemographic Select By Foreign Key

		#endregion

		#region CustomerDemographic Add Item

		[WebHelp(Comment = "Submits a new or updated CustomerDemographic to be persisted")]
		[WebInvoke(UriTemplate = "CustomerDemographic", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		CustomerDemographicDTO PersistCustomerDemographic(CustomerDemographicDTO customerdemographic)
		{
			return customerdemographic.Persist();
		}

		#endregion

		#region CustomerDemographic Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographic?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebInvoke(UriTemplate = "CustomerDemographic({customertypeid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerDemographic(string customertypeid)
		{
			CustomerDemographicDTO customerdemographic = new CustomerDemographicDTO();
			customerdemographic.SelectUsingPK(customertypeid);
			return customerdemographic.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographic?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebInvoke(UriTemplate = "CustomerDemographic({customertypeid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerDemographicJson(string customertypeid)
		{
			return this.DeleteCustomerDemographic(customertypeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerDemographic?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of CustomerDemographic objects to the user")]
		[WebInvoke(UriTemplate = "CustomerDemographic({customertypeid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerDemographicXML(string customertypeid)
		{
			return this.DeleteCustomerDemographic(customertypeid);
		}

		#endregion

		#region Customer Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerList
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerDTO> CustomerList()
		{
			List<CustomerDTO> retval = new List<CustomerDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerList
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerDTO> CustomerListJson()
		{
			return this.CustomerList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerList
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<CustomerDTO> CustomerListXML()
		{
			return this.CustomerList();
		}

		#endregion

		#region Customer Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Customer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "Customer({customerid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CustomerDTO Customer(string customerid)
		{
			CustomerDTO retVal = new CustomerDTO();
			retVal.SelectUsingPK(customerid);
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Customer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "Customer({customerid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		CustomerDTO CustomerJson(string customerid)
		{
			return this.Customer(customerid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Customer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "Customer({customerid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		CustomerDTO CustomerXML(string customerid)
		{
			return this.Customer(customerid);
		}

		#endregion

		#region Customer select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CustomerDTO> CustomerListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<CustomerDTO> dtoList = new List<CustomerDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<CustomerDTO> CustomerListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CustomerListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<CustomerDTO> CustomerListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.CustomerListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Customer Select by Column

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerByCityField?city=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerByCityField({city})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerDTO> CustomerByCityField(string city)
		{
			List<CustomerDTO> retval = new List<CustomerDTO>();
			retval.SelectByCityField(city);
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerByCityField?city=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerByCityField({city})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<CustomerDTO> CustomerByCityFieldJson(string city)
		{
			return this.CustomerByCityFieldJson(city);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/CustomerByCityField?city=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebGet(UriTemplate = "CustomerByCityField({city})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<CustomerDTO> CustomerByCityFieldXML(string city)
		{
			return this.CustomerByCityFieldJson(city);
		}

		#endregion

		#region Customer Select By Foreign Key

		#endregion

		#region Customer Add Item

		[WebHelp(Comment = "Submits a new or updated Customer to be persisted")]
		[WebInvoke(UriTemplate = "Customer", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		CustomerDTO PersistCustomer(CustomerDTO customer)
		{
			return customer.Persist();
		}

		#endregion

		#region Customer Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Customer?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebInvoke(UriTemplate = "Customer({customerid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomer(string customerid)
		{
			CustomerDTO customer = new CustomerDTO();
			customer.SelectUsingPK(customerid);
			return customer.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Customer?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebInvoke(UriTemplate = "Customer({customerid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerJson(string customerid)
		{
			return this.DeleteCustomer(customerid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Customer?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Customer objects to the user")]
		[WebInvoke(UriTemplate = "Customer({customerid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteCustomerXML(string customerid)
		{
			return this.DeleteCustomer(customerid);
		}

		#endregion

		#region Employee Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeList
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "EmployeeList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeDTO> EmployeeList()
		{
			List<EmployeeDTO> retval = new List<EmployeeDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeList
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "EmployeeList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeDTO> EmployeeListJson()
		{
			return this.EmployeeList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeList
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "EmployeeList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<EmployeeDTO> EmployeeListXML()
		{
			return this.EmployeeList();
		}

		#endregion

		#region Employee Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Employee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "Employee({employeeid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		EmployeeDTO Employee(string employeeid)
		{
			EmployeeDTO retVal = new EmployeeDTO();
			retVal.SelectUsingPK(int.Parse(employeeid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Employee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "Employee({employeeid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		EmployeeDTO EmployeeJson(string employeeid)
		{
			return this.Employee(employeeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Employee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "Employee({employeeid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		EmployeeDTO EmployeeXML(string employeeid)
		{
			return this.Employee(employeeid);
		}

		#endregion

		#region Employee select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Employee objects to the user")]
		[WebGet(UriTemplate = "EmployeeListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<EmployeeDTO> EmployeeListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<EmployeeDTO> dtoList = new List<EmployeeDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "EmployeeListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<EmployeeDTO> EmployeeListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.EmployeeListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebGet(UriTemplate = "EmployeeListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<EmployeeDTO> EmployeeListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.EmployeeListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Employee Select by Column

		#endregion

		#region Employee Select By Foreign Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/Employee", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeDTO> EmployeeByEmployee(string employeeid)
		{
			List<EmployeeDTO> retval = new List<EmployeeDTO>();
			retval.SelectByEmployee(int.Parse(employeeid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/Employee?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeDTO> EmployeeByEmployeeJson(string employeeid)
		{
			return EmployeeByEmployee(employeeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/Employee?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<EmployeeDTO> EmployeeByEmployeeXML(string employeeid)
		{
			return EmployeeByEmployee(employeeid);
		}

		#endregion

		#region Employee Add Item

		[WebHelp(Comment = "Submits a new or updated Employee to be persisted")]
		[WebInvoke(UriTemplate = "Employee", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		EmployeeDTO PersistEmployee(EmployeeDTO employee)
		{
			return employee.Persist();
		}

		#endregion

		#region Employee Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Employee?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebInvoke(UriTemplate = "Employee({employeeid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteEmployee(string employeeid)
		{
			EmployeeDTO employee = new EmployeeDTO();
			employee.SelectUsingPK(int.Parse(employeeid));
			return employee.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Employee?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebInvoke(UriTemplate = "Employee({employeeid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteEmployeeJson(string employeeid)
		{
			return this.DeleteEmployee(employeeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Employee?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Employee objects to the user")]
		[WebInvoke(UriTemplate = "Employee({employeeid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteEmployeeXML(string employeeid)
		{
			return this.DeleteEmployee(employeeid);
		}

		#endregion

		#region EmployeeTerritory Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryList
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritoryList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryList()
		{
			List<EmployeeTerritoryDTO> retval = new List<EmployeeTerritoryDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryList
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritoryList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryListJson()
		{
			return this.EmployeeTerritoryList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryList
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritoryList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryListXML()
		{
			return this.EmployeeTerritoryList();
		}

		#endregion

		#region EmployeeTerritory Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritory?employeeid=somevalue&territoryid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritory({employeeid}, {territoryid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		EmployeeTerritoryDTO EmployeeTerritory(string employeeid, string territoryid)
		{
			EmployeeTerritoryDTO retVal = new EmployeeTerritoryDTO();
			retVal.SelectUsingPK(int.Parse(employeeid), territoryid);
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritory?employeeid=somevalue&territoryid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritory({employeeid}, {territoryid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		EmployeeTerritoryDTO EmployeeTerritoryJson(string employeeid, string territoryid)
		{
			return this.EmployeeTerritory(employeeid, territoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritory?employeeid=somevalue&territoryid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritory({employeeid}, {territoryid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		EmployeeTerritoryDTO EmployeeTerritoryXML(string employeeid, string territoryid)
		{
			return this.EmployeeTerritory(employeeid, territoryid);
		}

		#endregion

		#region EmployeeTerritory select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<EmployeeTerritoryDTO> EmployeeTerritoryListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<EmployeeTerritoryDTO> dtoList = new List<EmployeeTerritoryDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritoryListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<EmployeeTerritoryDTO> EmployeeTerritoryListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.EmployeeTerritoryListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebGet(UriTemplate = "EmployeeTerritoryListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<EmployeeTerritoryDTO> EmployeeTerritoryListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.EmployeeTerritoryListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region EmployeeTerritory Select by Column

		#endregion

		#region EmployeeTerritory Select By Foreign Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/EmployeeTerritory", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryByEmployee(string employeeid)
		{
			List<EmployeeTerritoryDTO> retval = new List<EmployeeTerritoryDTO>();
			retval.SelectByEmployee(int.Parse(employeeid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/EmployeeTerritory?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryByEmployeeJson(string employeeid)
		{
			return EmployeeTerritoryByEmployee(employeeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/EmployeeTerritory?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryByEmployeeXML(string employeeid)
		{
			return EmployeeTerritoryByEmployee(employeeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryByTerritory?territoryid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects for the parent Territory object.")]
		[WebGet(UriTemplate = "Territory({territoryid})/EmployeeTerritory", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryByTerritory(string territoryid)
		{
			List<EmployeeTerritoryDTO> retval = new List<EmployeeTerritoryDTO>();
			retval.SelectByTerritory(territoryid);
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryByTerritory?territoryid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects for the parent Territory object.")]
		[WebGet(UriTemplate = "Territory({territoryid})/EmployeeTerritory?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryByTerritoryJson(string territoryid)
		{
			return EmployeeTerritoryByTerritory(territoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritoryByTerritory?territoryid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects for the parent Territory object.")]
		[WebGet(UriTemplate = "Territory({territoryid})/EmployeeTerritory?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<EmployeeTerritoryDTO> EmployeeTerritoryByTerritoryXML(string territoryid)
		{
			return EmployeeTerritoryByTerritory(territoryid);
		}

		#endregion

		#region EmployeeTerritory Add Item

		[WebHelp(Comment = "Submits a new or updated EmployeeTerritory to be persisted")]
		[WebInvoke(UriTemplate = "EmployeeTerritory", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		EmployeeTerritoryDTO PersistEmployeeTerritory(EmployeeTerritoryDTO employeeterritory)
		{
			return employeeterritory.Persist();
		}

		#endregion

		#region EmployeeTerritory Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritory?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebInvoke(UriTemplate = "EmployeeTerritory({employeeid}, {territoryid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteEmployeeTerritory(string employeeid, string territoryid)
		{
			EmployeeTerritoryDTO employeeterritory = new EmployeeTerritoryDTO();
			employeeterritory.SelectUsingPK(int.Parse(employeeid), territoryid);
			return employeeterritory.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritory?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebInvoke(UriTemplate = "EmployeeTerritory({employeeid}, {territoryid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteEmployeeTerritoryJson(string employeeid, string territoryid)
		{
			return this.DeleteEmployeeTerritory(employeeid, territoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/EmployeeTerritory?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of EmployeeTerritory objects to the user")]
		[WebInvoke(UriTemplate = "EmployeeTerritory({employeeid}, {territoryid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteEmployeeTerritoryXML(string employeeid, string territoryid)
		{
			return this.DeleteEmployeeTerritory(employeeid, territoryid);
		}

		#endregion

		#region OrderDetail Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailList
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetailList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailList()
		{
			List<OrderDetailDTO> retval = new List<OrderDetailDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailList
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetailList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailListJson()
		{
			return this.OrderDetailList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailList
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetailList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailListXML()
		{
			return this.OrderDetailList();
		}

		#endregion

		#region OrderDetail Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetail?orderid=somevalue&productid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetail({orderid}, {productid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		OrderDetailDTO OrderDetail(string orderid, string productid)
		{
			OrderDetailDTO retVal = new OrderDetailDTO();
			retVal.SelectUsingPK(int.Parse(orderid), int.Parse(productid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetail?orderid=somevalue&productid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetail({orderid}, {productid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		OrderDetailDTO OrderDetailJson(string orderid, string productid)
		{
			return this.OrderDetail(orderid, productid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetail?orderid=somevalue&productid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetail({orderid}, {productid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		OrderDetailDTO OrderDetailXML(string orderid, string productid)
		{
			return this.OrderDetail(orderid, productid);
		}

		#endregion

		#region OrderDetail select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetailListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<OrderDetailDTO> OrderDetailListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<OrderDetailDTO> dtoList = new List<OrderDetailDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetailListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<OrderDetailDTO> OrderDetailListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.OrderDetailListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebGet(UriTemplate = "OrderDetailListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<OrderDetailDTO> OrderDetailListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.OrderDetailListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region OrderDetail Select by Column

		#endregion

		#region OrderDetail Select By Foreign Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailByOrder?orderid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects for the parent Order object.")]
		[WebGet(UriTemplate = "Order({orderid})/OrderDetail", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailByOrder(string orderid)
		{
			List<OrderDetailDTO> retval = new List<OrderDetailDTO>();
			retval.SelectByOrder(int.Parse(orderid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailByOrder?orderid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects for the parent Order object.")]
		[WebGet(UriTemplate = "Order({orderid})/OrderDetail?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailByOrderJson(string orderid)
		{
			return OrderDetailByOrder(orderid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailByOrder?orderid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects for the parent Order object.")]
		[WebGet(UriTemplate = "Order({orderid})/OrderDetail?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailByOrderXML(string orderid)
		{
			return OrderDetailByOrder(orderid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailByProduct?productid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects for the parent Product object.")]
		[WebGet(UriTemplate = "Product({productid})/OrderDetail", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailByProduct(string productid)
		{
			List<OrderDetailDTO> retval = new List<OrderDetailDTO>();
			retval.SelectByProduct(int.Parse(productid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailByProduct?productid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects for the parent Product object.")]
		[WebGet(UriTemplate = "Product({productid})/OrderDetail?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailByProductJson(string productid)
		{
			return OrderDetailByProduct(productid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetailByProduct?productid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects for the parent Product object.")]
		[WebGet(UriTemplate = "Product({productid})/OrderDetail?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<OrderDetailDTO> OrderDetailByProductXML(string productid)
		{
			return OrderDetailByProduct(productid);
		}

		#endregion

		#region OrderDetail Add Item

		[WebHelp(Comment = "Submits a new or updated OrderDetail to be persisted")]
		[WebInvoke(UriTemplate = "OrderDetail", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		OrderDetailDTO PersistOrderDetail(OrderDetailDTO orderdetail)
		{
			return orderdetail.Persist();
		}

		#endregion

		#region OrderDetail Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetail?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebInvoke(UriTemplate = "OrderDetail({orderid}, {productid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteOrderDetail(string orderid, string productid)
		{
			OrderDetailDTO orderdetail = new OrderDetailDTO();
			orderdetail.SelectUsingPK(int.Parse(orderid), int.Parse(productid));
			return orderdetail.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetail?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebInvoke(UriTemplate = "OrderDetail({orderid}, {productid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteOrderDetailJson(string orderid, string productid)
		{
			return this.DeleteOrderDetail(orderid, productid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderDetail?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of OrderDetail objects to the user")]
		[WebInvoke(UriTemplate = "OrderDetail({orderid}, {productid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteOrderDetailXML(string orderid, string productid)
		{
			return this.DeleteOrderDetail(orderid, productid);
		}

		#endregion

		#region Order Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderList
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "OrderList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderList()
		{
			List<OrderDTO> retval = new List<OrderDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderList
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "OrderList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderListJson()
		{
			return this.OrderList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderList
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "OrderList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<OrderDTO> OrderListXML()
		{
			return this.OrderList();
		}

		#endregion

		#region Order Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Order?orderid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "Order({orderid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		OrderDTO Order(string orderid)
		{
			OrderDTO retVal = new OrderDTO();
			retVal.SelectUsingPK(int.Parse(orderid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Order?orderid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "Order({orderid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		OrderDTO OrderJson(string orderid)
		{
			return this.Order(orderid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Order?orderid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "Order({orderid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		OrderDTO OrderXML(string orderid)
		{
			return this.Order(orderid);
		}

		#endregion

		#region Order select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Order objects to the user")]
		[WebGet(UriTemplate = "OrderListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<OrderDTO> OrderListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<OrderDTO> dtoList = new List<OrderDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "OrderListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<OrderDTO> OrderListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.OrderListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebGet(UriTemplate = "OrderListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<OrderDTO> OrderListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.OrderListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Order Select by Column

		#endregion

		#region Order Select By Foreign Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByCustomer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Customer object.")]
		[WebGet(UriTemplate = "Customer({customerid})/Order", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderByCustomer(string customerid)
		{
			List<OrderDTO> retval = new List<OrderDTO>();
			retval.SelectByCustomer(customerid);
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByCustomer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Customer object.")]
		[WebGet(UriTemplate = "Customer({customerid})/Order?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderByCustomerJson(string customerid)
		{
			return OrderByCustomer(customerid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByCustomer?customerid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Customer object.")]
		[WebGet(UriTemplate = "Customer({customerid})/Order?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<OrderDTO> OrderByCustomerXML(string customerid)
		{
			return OrderByCustomer(customerid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/Order", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderByEmployee(string employeeid)
		{
			List<OrderDTO> retval = new List<OrderDTO>();
			retval.SelectByEmployee(int.Parse(employeeid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/Order?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderByEmployeeJson(string employeeid)
		{
			return OrderByEmployee(employeeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByEmployee?employeeid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Employee object.")]
		[WebGet(UriTemplate = "Employee({employeeid})/Order?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<OrderDTO> OrderByEmployeeXML(string employeeid)
		{
			return OrderByEmployee(employeeid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByShipper?shipperid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Shipper object.")]
		[WebGet(UriTemplate = "Shipper({shipperid})/Order", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderByShipper(string shipperid)
		{
			List<OrderDTO> retval = new List<OrderDTO>();
			retval.SelectByShipper(int.Parse(shipperid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByShipper?shipperid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Shipper object.")]
		[WebGet(UriTemplate = "Shipper({shipperid})/Order?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<OrderDTO> OrderByShipperJson(string shipperid)
		{
			return OrderByShipper(shipperid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/OrderByShipper?shipperid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects for the parent Shipper object.")]
		[WebGet(UriTemplate = "Shipper({shipperid})/Order?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<OrderDTO> OrderByShipperXML(string shipperid)
		{
			return OrderByShipper(shipperid);
		}

		#endregion

		#region Order Add Item

		[WebHelp(Comment = "Submits a new or updated Order to be persisted")]
		[WebInvoke(UriTemplate = "Order", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		OrderDTO PersistOrder(OrderDTO order)
		{
			return order.Persist();
		}

		#endregion

		#region Order Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Order?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebInvoke(UriTemplate = "Order({orderid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteOrder(string orderid)
		{
			OrderDTO order = new OrderDTO();
			order.SelectUsingPK(int.Parse(orderid));
			return order.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Order?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebInvoke(UriTemplate = "Order({orderid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteOrderJson(string orderid)
		{
			return this.DeleteOrder(orderid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Order?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Order objects to the user")]
		[WebInvoke(UriTemplate = "Order({orderid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteOrderXML(string orderid)
		{
			return this.DeleteOrder(orderid);
		}

		#endregion

		#region Product Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductList
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "ProductList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ProductDTO> ProductList()
		{
			List<ProductDTO> retval = new List<ProductDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductList
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "ProductList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ProductDTO> ProductListJson()
		{
			return this.ProductList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductList
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "ProductList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<ProductDTO> ProductListXML()
		{
			return this.ProductList();
		}

		#endregion

		#region Product Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Product?productid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "Product({productid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		ProductDTO Product(string productid)
		{
			ProductDTO retVal = new ProductDTO();
			retVal.SelectUsingPK(int.Parse(productid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Product?productid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "Product({productid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		ProductDTO ProductJson(string productid)
		{
			return this.Product(productid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Product?productid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "Product({productid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		ProductDTO ProductXML(string productid)
		{
			return this.Product(productid);
		}

		#endregion

		#region Product select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Product objects to the user")]
		[WebGet(UriTemplate = "ProductListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<ProductDTO> ProductListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<ProductDTO> dtoList = new List<ProductDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "ProductListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<ProductDTO> ProductListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.ProductListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebGet(UriTemplate = "ProductListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<ProductDTO> ProductListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.ProductListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Product Select by Column

		#endregion

		#region Product Select By Foreign Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductByCategory?categoryid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects for the parent Category object.")]
		[WebGet(UriTemplate = "Category({categoryid})/Product", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ProductDTO> ProductByCategory(string categoryid)
		{
			List<ProductDTO> retval = new List<ProductDTO>();
			retval.SelectByCategory(int.Parse(categoryid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductByCategory?categoryid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects for the parent Category object.")]
		[WebGet(UriTemplate = "Category({categoryid})/Product?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ProductDTO> ProductByCategoryJson(string categoryid)
		{
			return ProductByCategory(categoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductByCategory?categoryid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects for the parent Category object.")]
		[WebGet(UriTemplate = "Category({categoryid})/Product?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<ProductDTO> ProductByCategoryXML(string categoryid)
		{
			return ProductByCategory(categoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductBySupplier?supplierid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects for the parent Supplier object.")]
		[WebGet(UriTemplate = "Supplier({supplierid})/Product", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ProductDTO> ProductBySupplier(string supplierid)
		{
			List<ProductDTO> retval = new List<ProductDTO>();
			retval.SelectBySupplier(int.Parse(supplierid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductBySupplier?supplierid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects for the parent Supplier object.")]
		[WebGet(UriTemplate = "Supplier({supplierid})/Product?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ProductDTO> ProductBySupplierJson(string supplierid)
		{
			return ProductBySupplier(supplierid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ProductBySupplier?supplierid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects for the parent Supplier object.")]
		[WebGet(UriTemplate = "Supplier({supplierid})/Product?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<ProductDTO> ProductBySupplierXML(string supplierid)
		{
			return ProductBySupplier(supplierid);
		}

		#endregion

		#region Product Add Item

		[WebHelp(Comment = "Submits a new or updated Product to be persisted")]
		[WebInvoke(UriTemplate = "Product", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		ProductDTO PersistProduct(ProductDTO product)
		{
			return product.Persist();
		}

		#endregion

		#region Product Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Product?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebInvoke(UriTemplate = "Product({productid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteProduct(string productid)
		{
			ProductDTO product = new ProductDTO();
			product.SelectUsingPK(int.Parse(productid));
			return product.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Product?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebInvoke(UriTemplate = "Product({productid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteProductJson(string productid)
		{
			return this.DeleteProduct(productid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Product?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Product objects to the user")]
		[WebInvoke(UriTemplate = "Product({productid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteProductXML(string productid)
		{
			return this.DeleteProduct(productid);
		}

		#endregion

		#region Region Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/RegionList
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "RegionList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<RegionDTO> RegionList()
		{
			List<RegionDTO> retval = new List<RegionDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/RegionList
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "RegionList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<RegionDTO> RegionListJson()
		{
			return this.RegionList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/RegionList
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "RegionList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<RegionDTO> RegionListXML()
		{
			return this.RegionList();
		}

		#endregion

		#region Region Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Region?regionid=somevalue
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "Region({regionid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		RegionDTO Region(string regionid)
		{
			RegionDTO retVal = new RegionDTO();
			retVal.SelectUsingPK(int.Parse(regionid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Region?regionid=somevalue
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "Region({regionid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		RegionDTO RegionJson(string regionid)
		{
			return this.Region(regionid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Region?regionid=somevalue
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "Region({regionid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		RegionDTO RegionXML(string regionid)
		{
			return this.Region(regionid);
		}

		#endregion

		#region Region select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/RegionListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Region objects to the user")]
		[WebGet(UriTemplate = "RegionListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<RegionDTO> RegionListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<RegionDTO> dtoList = new List<RegionDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/RegionListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "RegionListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<RegionDTO> RegionListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.RegionListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/RegionListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebGet(UriTemplate = "RegionListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<RegionDTO> RegionListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.RegionListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Region Select by Column

		#endregion

		#region Region Select By Foreign Key

		#endregion

		#region Region Add Item

		[WebHelp(Comment = "Submits a new or updated Region to be persisted")]
		[WebInvoke(UriTemplate = "Region", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		RegionDTO PersistRegion(RegionDTO region)
		{
			return region.Persist();
		}

		#endregion

		#region Region Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Region?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebInvoke(UriTemplate = "Region({regionid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteRegion(string regionid)
		{
			RegionDTO region = new RegionDTO();
			region.SelectUsingPK(int.Parse(regionid));
			return region.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Region?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebInvoke(UriTemplate = "Region({regionid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteRegionJson(string regionid)
		{
			return this.DeleteRegion(regionid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Region?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Region objects to the user")]
		[WebInvoke(UriTemplate = "Region({regionid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteRegionXML(string regionid)
		{
			return this.DeleteRegion(regionid);
		}

		#endregion

		#region Shipper Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ShipperList
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "ShipperList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ShipperDTO> ShipperList()
		{
			List<ShipperDTO> retval = new List<ShipperDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ShipperList
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "ShipperList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<ShipperDTO> ShipperListJson()
		{
			return this.ShipperList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ShipperList
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "ShipperList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<ShipperDTO> ShipperListXML()
		{
			return this.ShipperList();
		}

		#endregion

		#region Shipper Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Shipper?shipperid=somevalue
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "Shipper({shipperid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		ShipperDTO Shipper(string shipperid)
		{
			ShipperDTO retVal = new ShipperDTO();
			retVal.SelectUsingPK(int.Parse(shipperid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Shipper?shipperid=somevalue
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "Shipper({shipperid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		ShipperDTO ShipperJson(string shipperid)
		{
			return this.Shipper(shipperid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Shipper?shipperid=somevalue
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "Shipper({shipperid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		ShipperDTO ShipperXML(string shipperid)
		{
			return this.Shipper(shipperid);
		}

		#endregion

		#region Shipper select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ShipperListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Shipper objects to the user")]
		[WebGet(UriTemplate = "ShipperListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<ShipperDTO> ShipperListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<ShipperDTO> dtoList = new List<ShipperDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ShipperListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "ShipperListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<ShipperDTO> ShipperListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.ShipperListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/ShipperListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebGet(UriTemplate = "ShipperListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<ShipperDTO> ShipperListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.ShipperListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Shipper Select by Column

		#endregion

		#region Shipper Select By Foreign Key

		#endregion

		#region Shipper Add Item

		[WebHelp(Comment = "Submits a new or updated Shipper to be persisted")]
		[WebInvoke(UriTemplate = "Shipper", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		ShipperDTO PersistShipper(ShipperDTO shipper)
		{
			return shipper.Persist();
		}

		#endregion

		#region Shipper Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Shipper?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebInvoke(UriTemplate = "Shipper({shipperid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteShipper(string shipperid)
		{
			ShipperDTO shipper = new ShipperDTO();
			shipper.SelectUsingPK(int.Parse(shipperid));
			return shipper.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Shipper?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebInvoke(UriTemplate = "Shipper({shipperid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteShipperJson(string shipperid)
		{
			return this.DeleteShipper(shipperid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Shipper?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Shipper objects to the user")]
		[WebInvoke(UriTemplate = "Shipper({shipperid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteShipperXML(string shipperid)
		{
			return this.DeleteShipper(shipperid);
		}

		#endregion

		#region Supplier Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/SupplierList
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "SupplierList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<SupplierDTO> SupplierList()
		{
			List<SupplierDTO> retval = new List<SupplierDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/SupplierList
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "SupplierList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<SupplierDTO> SupplierListJson()
		{
			return this.SupplierList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/SupplierList
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "SupplierList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<SupplierDTO> SupplierListXML()
		{
			return this.SupplierList();
		}

		#endregion

		#region Supplier Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Supplier?supplierid=somevalue
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "Supplier({supplierid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		SupplierDTO Supplier(string supplierid)
		{
			SupplierDTO retVal = new SupplierDTO();
			retVal.SelectUsingPK(int.Parse(supplierid));
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Supplier?supplierid=somevalue
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "Supplier({supplierid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		SupplierDTO SupplierJson(string supplierid)
		{
			return this.Supplier(supplierid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Supplier?supplierid=somevalue
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "Supplier({supplierid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		SupplierDTO SupplierXML(string supplierid)
		{
			return this.Supplier(supplierid);
		}

		#endregion

		#region Supplier select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/SupplierListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Supplier objects to the user")]
		[WebGet(UriTemplate = "SupplierListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<SupplierDTO> SupplierListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<SupplierDTO> dtoList = new List<SupplierDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/SupplierListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "SupplierListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<SupplierDTO> SupplierListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.SupplierListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/SupplierListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebGet(UriTemplate = "SupplierListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<SupplierDTO> SupplierListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.SupplierListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Supplier Select by Column

		#endregion

		#region Supplier Select By Foreign Key

		#endregion

		#region Supplier Add Item

		[WebHelp(Comment = "Submits a new or updated Supplier to be persisted")]
		[WebInvoke(UriTemplate = "Supplier", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		SupplierDTO PersistSupplier(SupplierDTO supplier)
		{
			return supplier.Persist();
		}

		#endregion

		#region Supplier Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Supplier?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebInvoke(UriTemplate = "Supplier({supplierid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteSupplier(string supplierid)
		{
			SupplierDTO supplier = new SupplierDTO();
			supplier.SelectUsingPK(int.Parse(supplierid));
			return supplier.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Supplier?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebInvoke(UriTemplate = "Supplier({supplierid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteSupplierJson(string supplierid)
		{
			return this.DeleteSupplier(supplierid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Supplier?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Supplier objects to the user")]
		[WebInvoke(UriTemplate = "Supplier({supplierid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteSupplierXML(string supplierid)
		{
			return this.DeleteSupplier(supplierid);
		}

		#endregion

		#region Territory Select All

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryList
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "TerritoryList", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<TerritoryDTO> TerritoryList()
		{
			List<TerritoryDTO> retval = new List<TerritoryDTO>();
			retval.RunSelect();
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryList
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "TerritoryList/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<TerritoryDTO> TerritoryListJson()
		{
			return this.TerritoryList();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryList
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "TerritoryList/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<TerritoryDTO> TerritoryListXML()
		{
			return this.TerritoryList();
		}

		#endregion

		#region Territory Select By Primary Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Territory?territoryid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "Territory({territoryid})/", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		TerritoryDTO Territory(string territoryid)
		{
			TerritoryDTO retVal = new TerritoryDTO();
			retVal.SelectUsingPK(territoryid);
			return retVal;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Territory?territoryid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "Territory({territoryid})/?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		TerritoryDTO TerritoryJson(string territoryid)
		{
			return this.Territory(territoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Territory?territoryid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "Territory({territoryid})/?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		TerritoryDTO TerritoryXML(string territoryid)
		{
			return this.Territory(territoryid);
		}

		#endregion

		#region Territory select paged
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}
		[WebHelp(Comment = "Returns a page of Territory objects to the user")]
		[WebGet(UriTemplate = "TerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<TerritoryDTO> TerritoryListPaged(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			List<TerritoryDTO> dtoList = new List<TerritoryDTO>();
			return dtoList.RunSelect(pageSize, pageIndex, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=json
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "TerritoryListPage/json/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		PagedQueryResults<TerritoryDTO> TerritoryListPagedJson(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.TerritoryListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		
		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryListPage/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}&format=xml
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebGet(UriTemplate = "TerritoryListPage/xml/?pageIndex={pageIndex}&pageSize={pageSize}&sortOrder={sortOrder}&sortColumn={sortColumn}&linq={linq}", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		PagedQueryResults<TerritoryDTO> TerritoryListPagedXML(string pageIndex, string pageSize, string sortOrder, string sortColumn, string linq)
		{
			return this.TerritoryListPaged(pageIndex, pageSize, sortOrder, sortColumn, linq);
		}
		#endregion

		#region Territory Select by Column

		#endregion

		#region Territory Select By Foreign Key

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryByRegion?regionid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects for the parent Region object.")]
		[WebGet(UriTemplate = "Region({regionid})/Territory", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<TerritoryDTO> TerritoryByRegion(string regionid)
		{
			List<TerritoryDTO> retval = new List<TerritoryDTO>();
			retval.SelectByRegion(int.Parse(regionid));
			return retval;
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryByRegion?regionid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects for the parent Region object.")]
		[WebGet(UriTemplate = "Region({regionid})/Territory?format=json", ResponseFormat = WebMessageFormat.Json)]
		[OperationContract]
		List<TerritoryDTO> TerritoryByRegionJson(string regionid)
		{
			return TerritoryByRegion(regionid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/TerritoryByRegion?regionid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects for the parent Region object.")]
		[WebGet(UriTemplate = "Region({regionid})/Territory?format=xml", ResponseFormat = WebMessageFormat.Xml)]
		[OperationContract]
		List<TerritoryDTO> TerritoryByRegionXML(string regionid)
		{
			return TerritoryByRegion(regionid);
		}

		#endregion

		#region Territory Add Item

		[WebHelp(Comment = "Submits a new or updated Territory to be persisted")]
		[WebInvoke(UriTemplate = "Territory", Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		TerritoryDTO PersistTerritory(TerritoryDTO territory)
		{
			return territory.Persist();
		}

		#endregion

		#region Territory Delete

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Territory?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebInvoke(UriTemplate = "Territory({territoryid})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteTerritory(string territoryid)
		{
			TerritoryDTO territory = new TerritoryDTO();
			territory.SelectUsingPK(territoryid);
			return territory.Delete();
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Territory?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebInvoke(UriTemplate = "Territory({territoryid})/?format=json", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteTerritoryJson(string territoryid)
		{
			return this.DeleteTerritory(territoryid);
		}

		// returns data in response to a HTTP GET request with URIs of the form http://<url-for-svc-file>/Territory?orderdetailid=somevalue
		[WebHelp(Comment = "Returns a list of Territory objects to the user")]
		[WebInvoke(UriTemplate = "Territory({territoryid})/?format=xml", Method = "DELETE", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		[OperationContract]
		bool DeleteTerritoryXML(string territoryid)
		{
			return this.DeleteTerritory(territoryid);
		}

		#endregion


	}
}
